package com.cyh.pangu.offer;

import com.cyh.pangu.offer.common.TreeNode;

public class Offer27 {

    public TreeNode mirrorTree(TreeNode root) {
        if (root == null) {
            return root;
        }
        TreeNode tempRoot = root.left;
        root.left = root.right;
        root.right = tempRoot;

        mirrorTree(root.right);
        mirrorTree(root.left);
        return root;
    }

    public static void main(String[] args) {

    }
}
